import React, { Component } from 'react';
import {
  View,
  TouchableOpacity,
  Text,
  StyleSheet,
  Image,
  Platform,
  ScrollView,
} from 'react-native';



import BasePage from '../common/BasePage';
import Colors from '../../common/Colors';
import SizeUtils from '../../common/SizeUtils';
import Config from '../../config';
import WH_IndexHotView from './WH_IndexHotView'
import WH_IndexNewView from './WH_IndexNewView'
import TImage from '../../components/TImage';
import CommonCheckUserTypeAction from '../../actions/common/CommonCheckUserTypeAction';

const TOP_BTN_GROUP_LABELS = ["最新", "精选"];

export default class WorkHardPage extends BasePage {
  constructor(props) {
    super(props);

    this.state.btnGroupSelectedIndex = 0;
    this._scrollView = null;
    this._pageWidth = SizeUtils.getWindowSize().width;
    this._clickTopBtnTimer = null;
    this.state.scrollEnabled =false
  }

  render() {
    return (
      <View style={{backgroundColor: Colors.White, paddingTop: Config.paddingTop,
          flexDirection: 'column', flex:1}}>
        { this._renderChildPage()}
        { this._renderNavigationBar()}
        { this._renderStatusBar() }
      </View>
    )
  }

  _renderNavigationBarRightButtonContent() {
    return (
      <View style={{height:SizeUtils.translateDesignHeightToCode(51),
          flexDirection:"row", alignItems:"center", paddingTop:SizeUtils.translateDesignHeightToCode(0)}}>
        <TImage source={require("../../../resource/images/workhard/search2.png")}
          style={{width:44, height:44}}/>
      </View>
    )
  }

  _onPressNavigationBarRightBtn() {
    this.gotoPage(Config.pages.wh_search);
  }

  _renderChildPage() {
    return(
      <WH_IndexNewView page={this} home={this} style={{width:this._pageWidth}}/>
    )
  }


}

var styles = StyleSheet.create({
  topBtnTextStyle: {
    textAlign:"center",
  },
});
